#include <bits/stdc++.h>

using namespace std;

vector<int> slice_(int *arr,int l,int r,int step=1){
    vector<int> slice_vec;
    for(int i=l;i<r;i+=step) slice_vec.push_back(arr[i]);
    return slice_vec;
}
vector<int> slice_1(vector<int> arr,int l,int r,int step=1){
    vector<int> slice_vec;
    for(int i=l;i<r;i+=step) slice_vec.push_back(arr[i]);
    return slice_vec;
}

int main(){
    cout<<int(4^1)<<endl;
    cout<<int(4|1)<<endl;
    cout<<int(4&1)<<endl;
    cout<<int(~1)<<endl;
    cout<<int(4<<1)<<endl;
    cout<<int(4>>1)<<endl;
    cout<<"hi"<<endl;

    vector<int> nums={1,2,3};
    int nums2[]={1,2,3};
    for(auto x: nums) cout<<x<<" ";
    cout<<endl;
    vector<int> nums1= slice_(nums2,1,2);
    for(auto x:nums1) cout<<x<<" ";
    cout<<endl;
    vector<int> nums3= slice_1(nums,1,2);
    for(auto x:nums1) cout<<x<<" ";
}